package org.proxypublic;

import java.lang.reflect.Method;

/**
 * Created by chinalin on 2017/3/17.
 */
public class TestMain {
    public static void main(String[] args) {
        ProxyPublic proxyPublic = new ProxyPublic(HelloImpl.class) ;
        try {
            Method method = HelloImpl.class.getMethod("say2",Integer.class) ;
            proxyPublic.say(method,11);
            method = HelloImpl.class.getMethod("say1",boolean.class) ;
            proxyPublic.say(method,false);
            method = HelloImpl.class.getMethod("say",String.class) ;
            proxyPublic.say(method,"jack");
        }catch (Exception e){
            e.printStackTrace();
        }
    }
}
